package Ass1;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Bai6 {
	try {

		FileInputStream fis = new FileInputStream(new File("file1.txt"));
		FileOutputStream fos = new FileOutputStream(new File("file2.txt"));
		try {
			int counter = fis.read();
			while (counter != -1) {
				fos.write(counter);
				counter = fis.read();
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		try {
			fis.close();
			fos.close();
		} catch (Exception e) {
		}

	} catch (FileNotFoundException e) {
		e.printStackTrace();
	}
}

}

